# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-pypdf2
_pkgname=PyPDF2
pkgver=2.4.2
pkgrel=0
pkgdesc="Pure-Python library built as a PDF toolkit"
url="https://github.com/mstamy2/PyPDF2"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
options="!check" # upstream has issues with testing
makedepends="py3-setuptools"
checkdepends="py3-pillow py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python3 setup.py build
}

check() {
	pytest -v
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
65b1fba301b4db00c9a871d6644d35642ef5561916222a47da9b5109a1d07efba1d86c2eb71a949b8954ae3b26fab485ae421a0cd0d104b90f54c8b4a0793d81  PyPDF2-2.4.2.tar.gz
"
